import java.io.*;


public class IOHelper {

    //Read a line from the console
    String readFromConsole(){
        String s = null;
        try{
            BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
            s = is.readLine();
        }catch (IOException e){
            System.out.println("IOException: " + e);
        }
        return s;
    }
    
    //Write a String to the console
    String writeToConsole(String s){
        try{
            BufferedWriter os = new BufferedWriter(new OutputStreamWriter(System.out));
            os.write(s);
            os.flush();
        }catch (IOException e){
            System.out.println("IOException: " + e);
        }
        return s;
    }
}

